import java.io.BufferedInputStream;
import java.io.InputStream;
import java.net.URL;

import javax.swing.JApplet;

class RunScript extends JApplet {
	protected String username, system;
	
	String runScript(String scriptName){
	       String data = "";
	       try{
	           //send http request
	           URL url = new URL(getCodeBase().toString() + scriptName);
	           InputStream in = url.openStream();

	           //read response
	           BufferedInputStream buffIn = new BufferedInputStream(in);

	           do {
	               int temp = buffIn.read();
	               if(temp == -1) break;
	               data = data + (char)temp;
	           }while(true);
	       }
	       catch(Exception e){
	           data = "error!";
	       }
	       return data;
	   }
}